﻿using BaiTu.IOCServices;
using BaiTu.IQueueService;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using BaiTu.QueueEntity;
using BaiTu.QueueLogging;

namespace BaiTu.QueueService.Sub
{
    class Program
    {
        static void Main(string[] args)
        {
            IOCServices.EngineContext.Initialize(false);
            IQueue queue = EngineContext.Current.Resolve<IQueue>();
            ///检查队列是否存在
            queue.CreateIfNotExists<Domains.AppExceptionEntity>();
            Console.WriteLine("准备工作完成");


            var message = queue.GetRequestFromClient<Domains.AppExceptionEntity>();

            if (Logger == null)
            { 
            
            }

            BaiTu.QueueLogging.QueueLoggingService ser = EngineContext.Current.Resolve<QueueLoggingService>();
            ser.Starter();
            Console.Write("正在监听");
            Console.Read();

        }
        public Program()
        { 
        
        }
        public static ILogging.ILogger Logger { get; set; }

    }
}
